package cn.ml.gaoJi.jiHe.map;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class MyMap {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();
        map.put("CN","中华人民共和国");
        map.put("RU","俄罗斯联邦");
        map.put("FR","法兰西共和国");
        map.put("US","美利坚合众国");

        System.out.println(map.keySet());
        System.out.println(map.values());
        System.out.println(map);

        Set<String> keys = map.keySet();
        for (String key:keys){
            System.out.println(key+map.get(key));
        }

        System.out.println("***************EntrySet***************");

        Set<Map.Entry<String,String>> ms = map.entrySet();
        for (Map.Entry<String,String> o:ms){
            System.out.println( o.getKey()+o.getValue());

        }




    }
}
